/*
 * Copyright (C) 2011 Dirk Weißenborn, dirk.weissenborn@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.weissenborn.colabtex.client.view;

import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.ListBox;

/**
 * The Interface GroupManagerView.
 */
public interface GroupManagerView extends IsWidget {
  
	/**
	 * Gets the group name.
	 *
	 * @return the group name
	 */
	String getGroupName();
	
	/**
	 * Gets the permission.
	 *
	 * @return the permission
	 */
	String getPermission();
	
	/**
	 * Gets the member name.
	 *
	 * @return the member name
	 */
	String getMemberName();
	
	/**
	 * Gets the selected member.
	 *
	 * @return the selected member
	 */
	String getSelectedMember();
	
	/**
	 * Gets the member list.
	 *
	 * @return the member list
	 */
	ListBox getMemberList();
	
	/**
	 * Gets the group name box.
	 *
	 * @return the group name box
	 */
	ListBox getGroupNameBox();
	
	/**
	 * Gets the pad name.
	 *
	 * @return the pad name
	 */
	String getPadName();
	
	/**
	 * Gets the selected pad.
	 *
	 * @return the selected pad
	 */
	String getSelectedPad();
	
	/**
	 * Gets the pad list.
	 *
	 * @return the pad list
	 */
	ListBox getPadList();
	
	/**
	 * Adds the member.
	 *
	 * @param name the name
	 * @param role the role
	 */
	void addMember(String name, String role);
	
	/**
	 * Sets the presenter.
	 *
	 * @param listener the new presenter
	 */
	void setPresenter(Presenter listener);

	/**
	 * The Interface Presenter.
	 */
	public interface Presenter {
		
		/**
		 * Go to.
		 *
		 * @param place the place
		 */
		void goTo(Place place);
		
		/**
		 * Delete group.
		 */
		void deleteGroup();
		
		/**
		 * Adds the group pad.
		 */
		void addGroupPad();
		
		/**
		 * Fill pads.
		 */
		void fillPads();
		
		/**
		 * Adds the member.
		 *
		 * @param name the name
		 * @param role the role
		 * @param groupName the group name
		 */
		void addMember(String name, String role, String groupName);
		
		/**
		 * Delete member.
		 *
		 * @param name the name
		 * @param groupName the group name
		 */
		void deleteMember(String name, String groupName);
		
		/**
		 * Delete group pad.
		 *
		 * @param padName the pad name
		 * @param groupName the group name
		 */
		void deleteGroupPad(String padName, String groupName);
		
		/**
		 * Fill members.
		 */
		void fillMembers();
	}

	/**
	 * Delete member.
	 *
	 * @param name the name
	 */
	void deleteMember(String name);
}
